//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.mouslisten;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import org.come.Frame.AlreadyRecordedJframe;
import org.come.Frame.ZhuFrame;
import org.come.Jpanel.AlreadyRecordedJpanel;
import org.come.until.AccessSuitMsgUntil;
import org.come.until.MessagrFlagUntil;

public class IncludedSuitMouslisten implements MouseListener {
	private AlreadyRecordedJpanel recordedJpanel;

	public IncludedSuitMouslisten(AlreadyRecordedJpanel recordedJpanel) {
		this.recordedJpanel = recordedJpanel;
	}

	@Override
    public void mouseClicked(MouseEvent e) {
		if (this.recordedJpanel.getListModel().size() > 0) {
			if (this.recordedJpanel.getListSuit().getSelectedIndex() != -1) {
				String v = (String)this.recordedJpanel.getListSuit().getSelectedValue();
				int suitid = AccessSuitMsgUntil.returnSuitID(v);
				AlreadyRecordedJframe.getAlreadyRecordedJframe().getRecordedJpanel().setSuitid(suitid);
			} else {
				ZhuFrame.getZhuJpanel().addPrompt("请选择要收录的套装！！");
			}

		}
	}

	@Override
    public void mousePressed(MouseEvent e) {
	}

	@Override
    public void mouseReleased(MouseEvent e) {
	}

	@Override
    public void mouseEntered(MouseEvent e) {
			MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);

	}

	@Override
    public void mouseExited(MouseEvent e) {
		MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
	}
}
